home *** CD-ROM | disk | FTP | other *** search
/ PC Open 96 / PC Open 96 CD3.bin / fscommand / index.swf / scripts / DefineSprite_12 / frame_1 / DoAction.as
Encoding:
Text File  |  2004-01-08  |  661 b   |  27 lines

  1. this.onLoadInterval = function(MC, BAR)
  2. {
  3.    if(MC.getBytesTotal() < 100)
  4.    {
  5.       if(!this.loadInterval)
  6.       {
  7.          this.loadInterval = setInterval(this,"onLoadInterval",25,MC,BAR);
  8.       }
  9.       BAR._visible = false;
  10.       this._visible = false;
  11.       return undefined;
  12.    }
  13.    this._visible = true;
  14.    BAR._visible = true;
  15.    BAR._xscale = 100 / (MC.getBytesTotal() / MC.getBytesLoaded());
  16.    if(MC.getBytesLoaded() < MC.getBytesTotal())
  17.    {
  18.       return undefined;
  19.    }
  20.    clearInterval(this.loadInterval);
  21. };
  22. this.onLoadInterval(_root.VIDEO,this.BAR);
  23. this.onUnload = function()
  24. {
  25.    clearInterval(this.loadInterval);
  26. };
  27.